import request from "../utils/request.js"

export function hotGoods(data) {
	return request({
		url: "/index/Goods",
		data
	})
}
export function SysParam() {
	return request({
		url: "/index/SysParam"
	})
}
//商户列表
export function share() {
	return request({
		url: "/index/share"
	})
}
//商户列表
export function ShopList(data) {
	return request({
		url: "/User/ChooseShop",
		data
	})
}
//选择商户
export function ChooseShop(data) {
	return request({
		url: "/User/ChooseShop",
		method: 'post',
		data
	})
}
//检测绑定
export function CheckShop() {
	return request({
		url: "/index/CheckShop",
	})
}

//商户子店
export function childShopList(data) {
	return request({
		url: "/User/ChooseDian",
		data
	})
}
//选择子店
export function ChooseDian(data) {
	return request({
		url: "/User/DianList",
		method: 'post',
		data
	})
}
//首页产品
export function Home() {
	return request({
		url: "/index/Index",
	})
}


export function getKey(data) {
	return request({
		url: "/Open/getSessionKey",
		data
	})
}
// 优惠券
export function QuanList(data) {
	return request({
		url: "/order/QuanList",
		data
	})
}

// 计算价格
export function PriceSum(data) {
	return request({
		url: "/order/PriceSum",
		data
	})
}


export function UserInfo() {
	return request({
		url: "/user/UserInfo"
	})
}
export function postUserInfo(data) {
	return request({
		url: "/user/UserInfo",
		method: 'post',
		data
	})
}

export function UserIndex() {
	return request({
		url: "/user/Index"
	})
}


// 列表
export function getCategory() {
	return request({
		url: "/goods/getCategory"
	})
}

// 商品列表
export function GoodsList(data) {
	return request({
		url: "/goods/GoodsList",
		data
	})
}

// 实体店铺
export function SShop(data) {
	return request({
		url: "/Index/SShop",
		data
	})
}
// 实体店铺转账
export function ShopTransfer(data) {
	return request({
		url: "/User/ShopTransfer",
		method: 'post',
		data
	})
}


// 商品详情
export function GoodsDetail(data) {
	return request({
		url: "/goods/GoodsDetail",
		data
	})
}

// 购物车数量
export function getCartSum() {
	return request({
		url: "/cart/getCartSum"
	})
}

// 提交订单
export function OrderFound(data) {
	return request({
		url: "/Order/OrderFound",
		data
	})
}

// 城市列表
export function CityList(data) {
	return request({
		url: "/User/CityList",
		data
	})
}

//新增地址
export function AddressAdd(data) {
	return request({
		url: "/User/AddressAdd",
		method: 'post',
		data
	})
}

//地址列表
export function AddressList() {
	return request({
		url: "/User/AddressList",
	})
}

// 删除地址
export function AddressDelete(data) {
	return request({
		url: "/User/AddressDelete",
		method: 'post',
		data
	})
}

//设置默认地址
export function AddressDefault(data) {
	return request({
		url: "/User/AddressDefault",
		method: 'post',
		data
	})
}

// 公告列表
export function NoticeList() {
	return request({
		url: "/Notice/NoticeList"
	})
}

// 公告详情
export function NoticeDetail(data) {
	return request({
		url: "/Notice/NoticeDetail",
		data
	})
}

// 关于我们
export function About() {
	return request({
		url: "/Notice/About"
	})
}

// 订单列表
export function OrderList() {
	return request({
		url: "/Order/OrderList"
	})
}

// 提交订单
export function CreateOrder(data) {
	return request({
		url: "/Order/OrderFound",
		method: 'post',
		data
	})
}


// 支付订单
export function OrderPay(data) {
	return request({
		url: "/Order/OrderPay",
		data
	})
}

//提交支付订单
export function OrderSub(data) {
	return request({
		url: "/Order/OrderPay",
		method: 'post',
		data
	})
}

//取消订单
export function CancelOrder(data) {
	return request({
		url: "/Order/CancelOrder",
		method: 'post',
		data
	})
}

// 提现
export function withdraw(data) {
	return request({
		url: "/User/UserWithdraw",
		method: 'post',
		data
	})
}

// 提现记录
export function UserWithdrawList() {
	return request({
		url: "/User/UserWithdraw"
	})
}


// 资金明细
export function finance(data) {
	return request({
		url: "/finance/FinanceList",
		data
	})
}

// 资金明细
export function RechargeFinance(data) {
	return request({
		url: "/user/RechargeFinance",
		data
	})
}
// 推荐明细
export function DownList(data) {
	return request({
		url: "/finance/DownList",
		data
	})
}


// 转账
export function transfer(data) {
	return request({
		url: "/user/UserTransfer",
		method: 'post',
		data
	})
}

// 发送验证码
export function sendCode(data) {
	return request({
		url: "/common/sendCode",
		method: 'post',
		data
	})
}
// 
export function SaveUser(data) {
	return request({
		url: "/User/SaveUser",
		method: 'post',
		data
	})
}


// 注册
export function register(data) {
	return request({
		url: "/Open/Register",
		method: 'post',
		data
	})
}

// 搜素商品
export function GoodsSearch(data) {
	return request({
		url: "/Goods/GoodsSearch",
		method: 'post',
		data
	})
}

// 登录
export function Login(data) {
	return request({
		url: "/Open/Login",
		method: 'post',
		data
	})
}
// 登录
export function GetOpenid(data) {
	return request({
		url: "/Open/GetOpenid",
		method: 'post',
		data
	})
}

// 登录手机号
export function GetPhone(data) {
	return request({
		url: "/Open/GetPhone",
		method: 'post',
		data
	})
}

// 登录
export function getUserInfo(data) {
	return request({
		url: "/Open/getUserInfo",
		method: 'post',
		data
	})
}
// 国家
export function commonParam() {
	return request({
		url: "/common/commonParam"
	})
}

// 修改登录密码
export function changePwd(data) {
	return request({
		url: "/user/changePwd",
		method: 'post',
		data
	})
}

// 修改资金密码
export function changePayPwd(data) {
	return request({
		url: "/user/changePayPwd",
		method: 'post',
		data
	})
}

// 收款方式资料
export function getUserBank() {
	return request({
		url: "/User/UserBank"
	})
}

// 添加编辑收款
export function UserBank(data) {
	return request({
		url: "/user/UserBank",
		method: 'post',
		data
	})
}



// 微信支付
export function wxPay(data) {
	return request({
		url: "/order/OrderWeChatGZPay",
		method: 'post',
		data
	})
}

// 微信支付的配置
export function WxConfig(data) {
	return request({
		url: "/order/wxConfig",
		data
	})
}
// 我的直推
export function MyDirect(data) {
	return request({
		url: "/User/MyDirect",
		data
	})
}

export function ShopIntroduce(data) {
	return request({
		url: "/user/ShopIntroduce",
		data
	})
}
export function getShopTransfer(data) {
	return request({
		url: "/user/ShopTransfer",
		data
	})
}
export function DianList(data) {
	return request({
		url: "/user/DianList",
		data
	})
}
export function QuanDetail(data) {
	return request({
		url: "/User/QuanDetail",
		data
	})
}